package cz.uvn.orthopedy.client.entity;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable
public class JournalEntry implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	protected Long id;

	@Persistent
	private Long hallID;

	@Persistent
	private Date date;

	@Persistent
	private Long doctorID;
	
	@Persistent
	private Long patientID;
	
	// one-to-one owned relation
	@Persistent
	private Operation operation;

	public JournalEntry() {
	}

	public JournalEntry(Long id, Long hallID, Date date, Long doctorID,
			Long patientID, Operation operation) {
		this.id = id;
		this.hallID = hallID;
		this.date = date;
		this.doctorID = doctorID;
		this.patientID = patientID;
		this.operation = operation;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getHallID() {
		return hallID;
	}

	public void setHallID(Long hallID) {
		this.hallID = hallID;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Long getDoctorID() {
		return doctorID;
	}

	public void setDoctorID(Long doctorID) {
		this.doctorID = doctorID;
	}

	public Long getPatientID() {
		return patientID;
	}

	public void setPatientID(Long patientID) {
		this.patientID = patientID;
	}

	public Operation getOperation() {
		return operation;
	}

	public void setOperation(Operation operation) {
		this.operation = operation;
	}

}
